
.main-container {
  height: 100%;
  overflow-y: auto;
  transition: margin-left .28s;
  // margin-left: $sideBarWidth;
  position: relative;
  -webkit-transition: margin-left .28s;
  -moz-transition: margin-left .28s;
  -ms-transition: margin-left .28s;
  -o-transition: margin-left .28s;
}
.sidebar-scroll-container{
  height:calc(100% -56px);
}
.sidebar-container {
  transition: width 0.28s;
  width: $sideBarWidth;
  background-color: $sidebarContainerBg;
  height: 100%;
  position: fixed;
  font-size: 0;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1001;
  // overflow-y: hidden;
  border-right: 1px solid #EEEEEE;

  // reset element-ui css
  .horizontal-collapse-transition {
    transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
    -webkit-transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
    -moz-transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
    -ms-transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
    -o-transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
}

  .scrollbar-wrapper {
    margin-right: 0!important;
    &::-webkit-scrollbar{
      display: none;
    }
    overflow-x: hidden !important;
  }

  .el-scrollbar__bar.is-vertical {
    right: 0px;
  }

  .el-scrollbar {
    padding: 0 4px;
    height: 100%;
  }
  .is-horizontal {
    display: none;
  }

  a {
    display: inline-block;
    width: 100%;
    overflow: hidden;
  }

  .svg-icon {
    margin-right: 8px;
  }

  .sub-el-icon {
    margin-right: 8px;
    margin-left: -2px;
  }
  .el-menu {
    border: none;
    height: 100%;
    width: 100%;
    padding-bottom: 4px;
    &.el-menu--collapse .el-submenu {
      width: $sideBarCollapseWidth;
    }
    .svg-icon {
      width: 20px!important;
      height: 20px!important;
      vertical-align: middle!important;
    }
    .submenu-title-noDropdown, // 一级
    .el-submenu__title {
      font-size: $menuTextFont;
      height: $menuHeight;
      line-height: $menuHeight;
      margin: $menuMargin;
      font-weight: $menuTextFontWeight;
      &:hover {
        background-color: $menuHoverBg!important;
        color:  $menuHoverText!important;
      }
    }
    .submenu-title-noDropdow.is-active {
      background-color: $menuActiveBg!important;
      color: $menuActiveText!important;
      border: 10px solid red;
    }

    & .nest-menu .el-submenu>.el-submenu__title, & .el-submenu .el-menu-item {
      min-width: $sideBarWidth !important;
      background-color: $subMenuBg;
      font-size: $subMenuTextFont;
      margin: $subMenuMargin;
      font-weight: $subMenuTextFontWeight;
      height: $subMenuHeight;
      line-height: $subMenuHeight;
      &:hover {
        background-color: $subMenuHoverBg !important;
        color: $subMenuHoverText!important;
      }
    }
    .el-submenu{
      &.is-active {
        .el-menu-item {
          &.is-active{
            color: $subMenuActiveText!important;
            background: $subMenuActiveBg !important;
          }
        }
      }
    }
  }
}


.withoutAnimation {
  .main-container,
  .sidebar-container {
    transition: none;
  }
}

// when menu collapsed
.hideSidebar {
  .sidebar-container {
    width: $sideBarCollapseWidth !important;
  }

  // .main-container {
  //   margin-left: $sideBarCollapseWidth;
  // }
  .el-menu-item{
    border-radius: 8px;
  }
  .submenu-title-noDropdown {
    padding: 0 !important;
    position: relative;

    .el-tooltip {
      padding: 0 !important;

      .svg-icon {
        margin-left:14px;
      }

      .sub-el-icon {
        margin-left: 19px;
      }
    }
  }

  .el-submenu {
    overflow: hidden;
    border-radius: 8px;
    &>.el-submenu__title {
      padding: 0 !important;

      .svg-icon {
        margin-left: 14px;
      }

      .sub-el-icon {
        margin-left: 14px;
      }

      .el-submenu__icon-arrow {
        display: none;
      }
    }
  }

  .el-menu--collapse {
    .el-submenu {
      &.is-active{
        border-right: 8px;
        .svg-icon{
          margin-left: 16px;
        }
      }
      &>.el-submenu__title {
        &>span {
          height: 0;
          width: 0;
          overflow: hidden;
          visibility: hidden;
          display: inline-block;
        }
      }
    }
  }
}

// when menu collapsed
.el-menu--vertical {
  left: 50px!important;
  &>.el-menu {
    .svg-icon {
      margin-right: 16px;
    }
    .sub-el-icon {
      margin-right: 12px;
      margin-left: -2px;
    }
  }

  .nest-menu .el-submenu>.el-submenu__title,
  .el-menu-item {
      margin: $subMenuMargin;
      font-weight: $subMenuTextFontWeight;
      height: $subMenuHeight;
      line-height: $subMenuHeight;
    color: #323232;
    &.is-active {
      color: #ffffff!important;
      background-color: $subMenuActiveBg !important;
    }
    &:hover {
      color: #ffffff;
      background-color: $subMenuActiveBg !important;
    }
  }

  // the scroll bar appears when the subMenu is too long
  .el-menu--popup {
    max-height: 100vh;
    overflow-y: auto;

    &::-webkit-scrollbar-track-piece {
      background: #d3dce6;
    }

    &::-webkit-scrollbar {
      width: 6px;
    }

    &::-webkit-scrollbar-thumb {
      background: #99a9bf;
      border-radius: 20px;
    }
  }
}


.group-title{
  font-weight: 700;
  font-size: 12px;
  line-height:48px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  text-indent: 22px;
}

.el-menu .el-submenu__title{
  color: rgba(255, 255, 255, 0.6)!important;
}
